//Player.h
/*Header file for Player, a class that represents the facing, position, and speed of a player
Created by: Taryn Green & Chris Groce
Updated: 10/14/2013
*/

#ifndef PLAYER_H
#define PLAYER_H

#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

using namespace std;

class Player
{
public:
	Player();		//Initialize to 0 for now
	//Non-default constructors
	Player(float); // pass in roomSize for boundary conditions
	float getXPos();
	float getYPos();
	float getZPos();
	float getForwardSpeed();
	float getLeftSpeed();
	float getUpSpeed();
	float getSize();
//	float getXFacing();
	int getHorFacing();
	int getVertFacing();
//	float getZFacing();
	void setSpeed(float);
	void setHorFacing(int);
	void setVertFacing(int);
	void setXPos(float);
	void setYPos(float);
	void setZPos(float);
	//Functions for position
	//Increment speed & facing functions
	void incrementForwardSpeed();
	void decrementForwardSpeed();
	void incrementLeftSpeed();
	void decrementLeftSpeed();
	void incrementUpSpeed();
	void decrementUpSpeed();
	void turnLeft();
	void turnRight();
	void turnUp();
	void turnDown();
	void updatePositions();
	void resetSpeeds();

private:
	/*For serialization */
	friend class boost::serialization::access;
	template<class Archive>
	void serialize(Archive &ar, const unsigned int &version) {
		ar & forwardSpeed;
		ar & leftSpeed;
		ar & upSpeed;
		ar & vertFacing;
		ar & horFacing;
		ar & xPos;
		ar & yPos;
		ar & zPos;
		ar & size;
		ar & roomSize;
	}
	float roomSize;
	float forwardSpeed;
	float leftSpeed;
	float upSpeed;
//	float xFacing;	//Not sure how this will actually be stored
	int horFacing;
	int vertFacing;
	//Not sure how this will actually be stored
//	float zFacing;	//Not sure how this will actually be stored
	float xPos;
	float yPos;
	float zPos;
	float size;
};

#endif
